<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib uri="jstl-fn" prefix="fn" %>
<%@ taglib prefix="c" uri="jstl"%>
<jsp:include page="Templates/metas.jsp"/>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
		
		<jsp:include page="Templates/headerEng.jsp"/>
		
		<div id="container_aside">
		<span id="node_chat_njsd" class="ico_chat"></span>
		
       <jsp:include page="Templates/submenu_miredpostEng.jsp"/>
       
        <section id="container_right">
			<h1 class="mine_title"><img src="img/shadow_title.png" class="shadow_mineTit">MY REDPOST</h1>
				<h2 class="subtitle txt_blue underline">SEND A COMMENT</h2>
				<script type="text/javascript">
						function delComent( cve_comentario ){
							if(!confirm("Desea eliminar el comentario?")){
								return false;
							}
							document.getElementById("cve").value=cve_comentario;
							document.getElementById("acc").value=2;
							document.forms['comentariosForm'].submit();
							return true;
						}
					</script>
					<html:form action="mis_comentarios.do" method="post">
					<table class="table_reg2">
						<c:if test="${ save eq '1' }">
							<tr>
								<td colspan="3">
									<p class="mensajeOk">
										<img alt="icoOk" src="img/icoOk.png" > Message sent.
									</p>
								</td>
							</tr>
						</c:if>
						<tr>
							<td class="txt_gray">
								Write your comments or suggestions:
								<input type="hidden" name="acc" value="1" />
							</td>
						</tr>
						<tr>
		        			<th colspan="2" class="txt_red"> &nbsp;
		        				<c:if test="${ save eq '2' }">
		        					El comenatario no puede ir vac&iacute;o.
		        				</c:if> 
		        			</th>
		        		</tr>
						<tr>
							<td><textarea rows="8" cols="30" name="comentario" id="comentario"></textarea></td>
						</tr>
						<tr>
							<td align="right"><input type="image" src="img/btn_enviarMiniEng.png"></td>
						</tr>
						
					</table>
				</html:form>
					<table class="table_reg2">
						
						<c:forEach items="${comentarios}" var="comentario">
							<tr>
								<td>
									<p class="mensajeOk">
										<c:if test="${comentario.tipo eq 1 }">
											I 
										</c:if>
										<c:if test="${comentario.tipo ne 1 }">
											Admin 
										</c:if>
										${comentario.fecha}
										&nbsp;&nbsp<img src="img/btn_close.png" onclick="return delComent(${comentario.cve_comentario})">
									</p>
								</td>
							</tr>
							<tr>
								<td class="txt_gray">${comentario.comentario}</td>
							</tr>
							<tr>
								<td class="txt_gray"><hr></td>
							</tr>
						</c:forEach>
					</table>
				
				
        </section>
        <span class="clear"></span>
        </div>
        
<jsp:include page="Templates/footerEng.jsp"/>